#include "gameobject.h"

GameObject::GameObject(QGraphicsItem *parent)
    : QGraphicsPixmapItem(parent)
{
    // 启用碰撞检测
    setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
    setFlag(QGraphicsItem::ItemIsFocusable);

    // 默认情况下不处理键盘事件
    setFlag(QGraphicsItem::ItemIsFocusable, false);
}
